home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11836 < prev    next >
Encoding:
Text File  |  1996-08-05  |  954 b   |  27 lines

  1. Newsgroups: comp.lang.c
  2. Path: new-news.sprintlink.net!NEWS!not-for-mail
  3. From: jul395@prb.mhs.compuserve.com (Jonathan Julian)
  4. Subject: Is there a problem using memset on a malloc'd memory in HP-C
  5. Message-ID: <31a7cc$10b20.32c@NEWS>
  6. Date: Tue, 26 Mar 1996 21:14:46 GMT
  7. Organization: PRB Associates, Inc.
  8. X-Newsreader: Forte Free Agent 1.0.82
  9.  
  10. I have searched your FAQ and found no reference to this problem.
  11.  
  12. I am having trouble doing a malloc on memory that I allocated via
  13. malloc.  I malloc'd the memory, memset it  and immediately look at it
  14. and it is garbage.  I have changed my mallocs to callocs, but later in
  15. my code I realloc.  Since realloc does not initialize and I
  16. distrusting of memset I have written a loop to initialize my memory.
  17.  
  18. The structure that I am trying to initialize is an array of pointers
  19. to pointers that I would initially like to be NULL.  I am on HP
  20. a.09.07  using HP-C
  21.  
  22. Thanks for your help.
  23.  
  24. buc316@prb.mhs.compuserve.com
  25.  
  26.  
  27.